﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using NLBS.Urls;
using System.Web;

namespace NLBS.Web
{
   public class ReWriteUrls
    {
       private static UrlsData data = null;
       private static ReWriteUrls siteurls;
       public static ReWriteUrls Instance()
       {
           //XmlDocument doc = new XmlDocument();
           //doc.Load(HttpContext.Current.Request.PhysicalApplicationPath + "SiteUrls.config");
           //data = new UrlsData(doc, HttpContext.Current.Request.ApplicationPath);
           siteurls = new ReWriteUrls();
           return siteurls;
       }

       private string ApplicationPath = RequestWrapper.ApplicationPath;
       public string Index()
       {
           return RequestWrapper.ApplicationPath + "/default.aspx";
       }

       public string RssUrl()
       {
           throw new NotImplementedException();
       }

       public string ArticleCategoryRssUrl(int catID)
       {
           throw new NotImplementedException();
       }

       public string CommentRssUrl()
       {
           throw new NotImplementedException();
       }

       public string ArticleCategoryUrl(int catID)
       {
           return "#";
           //return RequestWrapper.ApplicationPath + string.Format("/category/{0}.aspx", catID);
       }

       public string ArticleSelectedUrl()
       {
           throw new NotImplementedException();
       }

       public string ArticleModeUrl(string mode)
       {
           return ApplicationPath + string.Format("/default.aspx?mode={0}", mode);
       }

       public string ArticleDateUrl(string date)
       {
           return RequestWrapper.ApplicationPath + string.Format("/default.aspx?date=", date);
       }

       public string ArticleConent(int articleID)
       {
           return "#";
          // return RequestWrapper.ApplicationPath + string.Format("/article/{0}.aspx", articleID);
       }

       public string Comment()
       {
           return RequestWrapper.ApplicationPath + "/comment.aspx";
       }

       public string CommentEditUrl(int commentID, int logID)
       {
           throw new NotImplementedException();
       }

       public string CommentDeleteUrl(int commentID, int logID)
       {
           throw new NotImplementedException();
       }

       public string GuestBook()
       {
           return RequestWrapper.ApplicationPath + "/gbook.aspx";
       }

       public string GuestBookEditUrl(int gbookID)
       {
           throw new NotImplementedException();
       }

       public string GuestBookDeleteUrl(int gbookID)
       {
           throw new NotImplementedException();
       }

       public string Login()
       {
           return RequestWrapper.ApplicationPath + "/login.aspx";
       }

       public string ArticleAction(string act, int articleID)
       {
           throw new NotImplementedException();
       }

       public string UserList()
       {
           return RequestWrapper.ApplicationPath + "/comment.aspx";
       }

       public string UserDetail(int id)
       {
           throw new NotImplementedException();
       }

       public string Visitors()
       {
           throw new NotImplementedException();
       }

       public string SelectedArticle()
       {
           return RequestWrapper.ApplicationPath + "/default.aspx?mode=true";
       }

       public string UserArticle(int id)
       {
           throw new NotImplementedException();
       }

       public string UserComment(int id)
       {
           throw new NotImplementedException();
       }

       public string[] ArticleComment(int id)
       {
           throw new NotImplementedException();
       }

       public string[] SingleComment(int id, int commentID)
       {
           throw new NotImplementedException();
       }
    }
}
